package sv.gob.mtps.sib.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import sv.gob.mtps.sib.dao.ObjetoespDAO;
import sv.gob.mtps.sib.model.Objetoespecifico;
import sv.gob.mtps.sib.model.ProductoHasObjetoespecifico;
import sv.gob.mtps.sib.model.VistaTotalOe;
import sv.gob.mtps.sib.model.VistaTotalOeId;

@Service
public class ObjetoespServiceImpl implements ObjetoespService{
	
	@Autowired
    private ObjetoespDAO objetoespDAO;


	@Transactional
	public void addOE(Objetoespecifico oe) {
		// TODO Auto-generated method stub
		objetoespDAO.addOE(oe);
	}

	@Transactional
	public void updateOE(Objetoespecifico oe) {
		// TODO Auto-generated method stub
		objetoespDAO.updateOE(oe);
	}

	@Transactional
	public List<Objetoespecifico> listOE() {
		// TODO Auto-generated method stub
		return objetoespDAO.listOE();
	}

	@Transactional
	public void removeOE(Integer id) {
		// TODO Auto-generated method stub
		objetoespDAO.removeOE(id);
	}

	@Transactional
	public Objetoespecifico findOE(Integer id) {
		// TODO Auto-generated method stub
		return objetoespDAO.findOE(id);
	}

	@Transactional
	public void addPOE(ProductoHasObjetoespecifico poe) {
		objetoespDAO.addPOE(poe);
		
	}

	@Transactional
	public void updatePOE(ProductoHasObjetoespecifico poe) {
		objetoespDAO.updatePOE(poe);
		
	}

	@Transactional
	public List<ProductoHasObjetoespecifico> listPOE() {
		// TODO Auto-generated method stub
		return objetoespDAO.listPOE();
	}

	@Transactional
	public void removePOE(Integer id) {
		objetoespDAO.removePOE(id);
		
	}

	@Transactional
	public ProductoHasObjetoespecifico findPOE(Integer id) {
		// TODO Auto-generated method stub
		return objetoespDAO.findPOE(id);
	}

	@Transactional
	public List<ProductoHasObjetoespecifico> pobjExist(int idObj, int idPrd) {
		// TODO Auto-generated method stub
		return objetoespDAO.pobjExist(idObj, idPrd);
	}

	@Transactional
	public List<VistaTotalOe> listTotalObj(int idObj) {
		// TODO Auto-generated method stub
		return objetoespDAO.listTotalObj(idObj);
	}

}
